Skip to content

Conversation

@me-no-dev
Copy link
Member

@me-no-dev me-no-dev commented Nov 6, 2025

This pull request updates low-level camera driver code for ESP32, ESP32-S2, and ESP32-S3 targets to improve compatibility with ESP-IDF version 5 and above. The changes mainly introduce conditional compilation to handle differences in peripheral clock and reset management APIs between ESP-IDF versions, ensuring the drivers work correctly across multiple ESP-IDF releases.

ESP-IDF v5+ compatibility improvements:

  • Added conditional includes for dport_access.h and dport_reg.h in ll_cam.c for ESP32 and ESP32-S2, and adjusted peripheral clock/reset handling to use DPORT macros on ESP-IDF v5+ (target/esp32/ll_cam.c, target/esp32s2/ll_cam.c). [1] [2]
  • Updated ll_cam_config functions to use DPORT macros for enabling and resetting the I2S peripheral on ESP-IDF v5+, while retaining the old API for earlier versions (target/esp32/ll_cam.c, target/esp32s2/ll_cam.c). [1] [2]

ESP32-S3 driver enhancements:

  • Adjusted includes and conditional logic for DMA and GDMA peripherals to select appropriate headers and APIs based on ESP-IDF version (target/esp32s3/ll_cam.c). [1] [2]
  • Updated DMA initialization to use DPORT macros for clock and reset on ESP-IDF v5+, and fallback to the older API otherwise (target/esp32s3/ll_cam.c).
  • Modified interrupt allocation to use the correct interrupt source for DMA on ESP-IDF v5+ (target/esp32s3/ll_cam.c).

These changes ensure that the camera drivers remain functional and stable across ESP-IDF version upgrades, particularly with the significant API changes introduced in ESP-IDF v5.

Fixes: #812

@me-no-dev me-no-dev changed the title Fix compilation for ESP32S3 in IDF 6 Fix reset camera peripheral in IDF 6 Nov 6, 2025
@me-no-dev me-no-dev force-pushed the bugfix/idf6_gdma_reset branch from 83c510a to 7a54af8 Compare November 6, 2025 08:19
@me-no-dev me-no-dev changed the title Fix reset camera peripheral in IDF 6 Fix compilation of GDMA and periph enable in IDF 6 Nov 6, 2025
@me-no-dev me-no-dev merged commit 3294767 into master Nov 6, 2025
30 checks passed
@me-no-dev me-no-dev deleted the bugfix/idf6_gdma_reset branch November 6, 2025 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

esp32-camera compilation fails with error 'PERIPH_GDMA_MODULE' undeclared

2 participants